package field

import "gitee.com/yanwc/net/utils"

type (
	Satellite    uint8   // 可用卫星数量(3-24)
	SatelliteRaw [1]byte // 可用卫星数量(3-24)
)

func (s Satellite) Raw() (out SatelliteRaw) {
	copy(out[:], utils.NumberToBytesWithBigEndian(s))
	return
}

func (s SatelliteRaw) Type() Satellite {
	return utils.BytesToNumber[Satellite](s[:])
}

func (s SatelliteRaw) Slice() []byte {
	return s[:]
}
